
extends SceneMapTileSet




func _init() -> void:
	cells_info = {
		0: {
			Vector2i(0, 0): {
				"name": "平地",
				"cost": 1,
				"is_through": true,
				"is_stay": true,
				"through_call": null,
				"stay_call": null,
				"description": "普通的平地"
			},
			
			Vector2i(1, 0): {
				"name": "墙壁",
				"cost": -1,
				"is_through": false,
				"is_stay": false,
				"through_call": null,
				"stay_call": null,
				"description": "墙壁，无法穿过，无法停留"
			},
			
			Vector2i(2, 0): {
				"name": "地刺",
				"cost": 1,
				"is_through": true,
				"is_stay": true,
				"through_call": _call_vec_x2y0,
				"stay_call": _call_vec_x2y0,
				"description": "地刺，经过或停留都会受到1点伤害"
			}
		}
	}




# 停留与经过的地刺回调
func _call_vec_x2y0(_unit: Unit) -> void:
	# 造成 1 点伤害
	_unit.property.current_hp -= 1
